package com.hqx.oop.myenum;

public class Test {
    public static void main(String[] args) {
        Size size = Size.SMALL;
//        System.out.println(size);
//        System.out.println(size.name());
//        System.out.println(size.toString());

//        System.out.println(size==Size.SMALL);
//        System.out.println(size.equals(Size.SMALL));
//        System.out.println(size==Size.MEDIUM);
//        //枚举的声明顺序
//        System.out.println(size.ordinal());

        System.out.println(Size.fromAbbr("S"));
        System.out.println(size.getAbbr());
    }
}
